package org.example.springbootproject.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.springbootproject.entity.User;

import java.time.LocalDateTime;

@Mapper
public interface UserMapper extends BaseMapper<User> {
    User selectByUsername(@Param("username") String username);
    void updateLastLogin(@Param("id") Long id,
                         @Param("loginTime") LocalDateTime loginTime,
                         @Param("loginIp") String loginIp);
}
